{% extends 'base/base.html' %}
{% block cssjs %}
    {% load static %}
    <link rel="stylesheet" href="{% static 'layui/layui.css' %}">
    <link rel="stylesheet" href="{% static 'css/invite.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/bookpublic.css' %}">
    <link rel="stylesheet" href="{% static 'css/bookstyle.css' %}">
    <link rel="stylesheet" href="{% static 'css/newStyle.css' %}">
    <link rel="stylesheet" href="{% static 'css/single.css' %}">
{% endblock %}
{% block content %}
    <div class="main w Ynavigation custom" style="margin-top: 80px">
    <!-- main start -->
    <div class="single_l fl">
        <!-----单本年鉴 左边 start --------->
        <img src="{{ MEDIA_URL }}{{ yearsinfo.image.url }}" width="209" height="300">
        <div class="single_tab">
            <span id="tit_ml" class="current" onclick="Switch('ml')">目录</span>
            <span id="tit_jj" onclick="Switch('jj')">&gt;>简介</span>
            <div class="clear"></div>
            <div id="div_ml" class="s_list" style="font-size: 12px">
                <!------目录 start---->
                <ul>
                    {% for i in content %}
                        <li><a href="?type=years&year={{ yearsinfo.year }}&shunxu={{ forloop.counter }}" title="{{ i.content }}">{{ i.content }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            <!------目录 end----->
            <!------简介 start------>
            <div id="div_jj" class="s_about hide"style="font-size: 12px">
                <p><strong>年鉴中文名:</strong>  {{ yearsinfo.chinese }}</p>
                <p><strong>年鉴年份:</strong>  {{ yearsinfo.year }}</p>
                <p><strong>责任说明:</strong>  {{ yearsinfo.author }}</p>
                <p><strong>主编单位:</strong>{{ yearsinfo.unit }}</p>
                <p><strong>出版日期:</strong>  {{ yearsinfo.pubtime }}</p>
                <p><strong>页数:</strong>  {{ yearsinfo.page }}</p>
                <p><strong>人民币定价:</strong>  {{ yearsinfo.money }}</p>
            </div>
            <!------简介 end------>
        </div>
    </div>
        <!-----单本年鉴 左边 end --------->
    <div id="div_single_r" class="single_r fl">
        <!-----单本年鉴 右边 start --------->

        <div class="s_year clearfix">
                    {% for year in yearlist %}
                        <a href="?type=years&select={{ year.year }}" class="{% ifequal year.year yearsinfo.year %}current{% endifequal %}">{{ year.year }}年</a>
                    {%  endfor %}
        </div>


    <style>
    .a04 {
        outline: 0;
        color: #00c582;
    }
</style>
<div id="ResultPage" class="s_page" style="font-size: 14px;">
    <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-10" style="margin: 0 auto 0 20px">
        <span class="layui-laypage-count" >共{{ counts }}条</span>
        {% for page in items.pages %}
            {% if page %}
                {% ifequal page items.number %}
                    <span class="layui-laypage-curr" ><em class="layui-laypage-em"></em><em>{{ page }}</em></span>
                {% else %}
                    <a href="?{{ page.querystring }}" class="page" data-page="{{ page }}" >{{ page }}</a>
                {% endifequal %}
            {% else %}
                <span class="layui-laypage-spr" >…</span>
            {% endif %}
        {% endfor %}
        <script>
            $("#demo7 .layui-laypage-btn").on("click", function () {
                location.href += "&page=" + $("#inputpage").val()
            })
        </script>
    </div>
</div>
<div id="ResultList_jy" class="s_table">
    <!----- 简约版 start------>
    <table>
        <tbody>
            <tr class="s_tab">
                <td class="s_tab_title" style="width:75%;">条目题名</td>
                <td style="width:10%;">页码</td>
                <td style="width:15%;">下载</td>
            </tr>
            {% for item in items.object_list %}
            <tr style="font-size: 12px">
                <td>{% if item.title not in item.category %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{% endif %}&nbsp;&nbsp;<a class="model_a" title="点击可查看pdf文档" href="/media/{{ item.pdf }}" data-filename="{{ item.identify }}.pdf" style="cursor: pointer">{{ item.title }}</a></td>
                <td class="s_tab_page">{{ item.page }}</td>
                <td>
                    {% if item.caj %}
                        <a target="_blank" href="/media/{{ item.caj }}" data-filename="{{ item.identify }}.caj"><img src="{% static 'img/nS_down1.png'%}"></a>
                    {% endif %}
                    {% if item.pdf %}
                        <a target="_blank" href="/media/{{ item.pdf }}" data-filename="{{ item.identify }}.pdf"><img src="{% static 'img/nS_down3.png'%}"></a>
                    {% endif %}
                    {% if item.excel %}
                        <a target="_blank" href="/media/{{ item.excel }}" data-filename="{{ item.identify }}.excel"><img src="{% static 'img/nS_down2.png'%}"></a>
                    {% endif %}
                </td>

            </tr>
            {%  endfor %}
    </tbody></table>

</div><!----- 简约版 end------>
<div id="ResultList_kz" class="s_table s_table_j hide">
    <!----- 快照版 start----->

</div><!----- 快照版 end-----></div>
        <!-----单本年鉴 右边 end --------->
    <script type="text/javascript">
        //左侧目录与简介切换
        function Switch(code) {
            if (code === 'ml') {
                $("#tit_jj").removeClass("current");
                $("#tit_ml").addClass("current");

                $("#div_jj").addClass("hide");
                $("#div_ml").removeClass("hide");

            } else {
                $("#tit_ml").removeClass("current");
                $("#tit_jj").addClass("current");

                $("#div_ml").addClass("hide");
                $("#div_jj").removeClass("hide");
            }
        }
</script>

</div>
</div>


{% endblock %}

{% block foot %}


{% endblock %}

